package com.yuanfeng.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanfeng.commoms.vo.goods.GoodsDetailsListVO;
import com.yuanfeng.commoms.vo.shop.RetentionShopInfoVO;
import com.yuanfeng.commoms.vo.shop.ShopEvaluationVO;
import com.yuanfeng.order.entity.OrderComplaintsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ClassName OrderComplaintsMapper
 * @Description  用户投诉表
 * @Author cyp
 * @Date 2023-08-23 09:38:14
 * @Version 1.0
 **/
@Mapper
public interface OrderComplaintsMapper extends BaseMapper<OrderComplaintsEntity> {

    /**
     * 查询发货时效
     * @param commonid
     * @return
     */
    List<Map> querydeliverytime(@Param("list") List commonid);

    /**
     * 获取商家质保金余额
     * @param shopId
     * @return
     */
    Integer selectshop(Integer shopId);

    /**
     * 修改账户余额
     * @param manageMoney
     * @return
     */
    Integer updateCardMemberDetailPort(Map<String, Object> manageMoney);

    /**
     * 新增支付明细
     * @param assetDetailMap
     * @return
     */
    Integer insertDetail(@Param("param")Map<String, Object> assetDetailMap);

    /**
     * 判断当前订单是否属于当前用户 1 是 2 否
     * @param comRecord
     * @return
     */
    Integer insertConsumeRecordport(Map<String, Object> comRecord);

    /**
     * 查询质保金信息
     * @param shopId
     * @return
     */
    RetentionShopInfoVO selectretention(Integer shopId);

    /**
     * 查询质保金信息
     * @param shopId
     * @return
     */
    RetentionShopInfoVO selectretention2(Integer shopId);

    /**
     * 发送站内信
     * @param messageOrderId
     * @param sellerId
     * @param sellerName
     * @param messageType
     * @param messageTitle
     * @param messageContent
     * @param shopId
     * @return
     */
     boolean insertSysMessage1(@Param("messageOrderId") String messageOrderId,@Param("sellerId") String sellerId, @Param("sellerName") String sellerName,
                                     @Param("messageType") Integer messageType, @Param("messageTitle") String messageTitle,
                                     @Param("messageContent") String messageContent,@Param("shopId") String shopId);

    /**
     * 更新shopbase表
     * @param map
     */
    Integer updateshopbase(@Param("param") Map<Object, Object> map);

    /**
     * 更新投诉
     * @param map
     * @return
     */
    Integer updatecomplaints(@Param("param")Map<String, Object> map);

    /**
     * 添加投诉
     * @param map
     * @return
     */
    Integer addcomplaints(@Param("param")Map<String, Object> map);

    /**
     * 查询投诉单列表
     * @param page
     * @param map
     * @return
     */
    IPage<OrderComplaintsEntity> queryComplaints(IPage<OrderComplaintsEntity> page, @Param("param")Map<String, Object> map);

    /**
     * 查询投诉详情
     * @param map
     * @return
     */
    OrderComplaintsEntity complaintsdetail(@Param("param")Map<String, Object> map);

    /**
     * 撤销投诉单
     * @param userId
     * @param complaintsId
     * @return
     */
    Integer revokeComplaints(@Param("userId")String userId, @Param("complaintsId")String complaintsId);

    /**
     * 查询订单是否投诉过
     * @param map
     * @return
     */
    Integer isComplaints(@Param("param") Map<String, Object> map);


    /**
     * 查询投诉列表
     * @param page
     * @param param
     * @return
     */
    IPage<OrderComplaintsEntity> queryComplaintsByPlatform(IPage<OrderComplaintsEntity> page , @Param("param") Map<String, Object> param);


    /**
     * 查询投诉详情
     * @param map
     * @return
     */
    OrderComplaintsEntity querycomplaintsdetail(@Param("param") Map<String,Object> map);


    /**
     *查询用户投诉信息
     * @param id
     * @return
     */
    OrderComplaintsEntity querycomplaintsdetail1(@Param("param") String id);

    /**
     * 查询商品信息
     * @param map
     * @return
     */
    List<GoodsDetailsListVO> queryGoodsList(@Param("param") Map<String, Object> map);

    /**
     * 查询店铺评分
     * @param shopId
     * @return
     */
    ShopEvaluationVO ShopScore(@Param("shopId") Integer shopId);


    /**
     * 修改质保金余额
     * @param map
     * @return
     */
    Integer handlingcomplaints(@Param("param") Map<String, Object> map);
}
